USE LeHanhSystemVN
GO

CREATE TABLE CaseRecord_Category
(
	CRC_ID         INT PRIMARY KEY,
	CRC_TableName  NVARCHAR(150)
)

CREATE TABLE CaseRecord_Tree
(
	CRT_ID           VARCHAR(20) PRIMARY KEY,
	CRT_ParentID     VARCHAR(20),
	CRT_Name         NVARCHAR(100),
	CRT_Description  NVARCHAR(250),	
	CRT_IsLeaf       CHAR(1),
	CRT_IsUsed       CHAR(1),
	CRT_Level        INT,
	CRT_BuildOrder   INT,
	CRC_ID           INT
)
	
CREATE TABLE CaseRecord_Leaf
(
	CRT_ID             VARCHAR(20) PRIMARY KEY,
	CRL_ColName        NVARCHAR(150),
	CRL_DataType       INT,
	CRL_MaxLength      INT,
	CRL_ControlType    INT,
	CRL_ControlNumber  INT,
	CRC_ID             INT
)
